.markdown-content {
  a {
    color: @color-primary;
  }
  p {
    margin: 0;
    white-space: pre-wrap;
  }

  ul, ol {
    margin: 0 0 8px 0;
    padding-left: 16px;
  }

  pre {
    font-size: 0.9230769231em;
    background: rgba(0,0,0,.05);
    margin: 4px 0 8px;
    white-space: pre-wrap;
    position: relative;

    + pre {margin-top: -3px;}

    code {
      background: none;
      &[data-lang] {
        &:before {
          content: attr(data-lang);
          position: absolute;
          right: 0;
          top: 0;
          line-height: (18*@rem);
          overflow: hidden;
          background-color: rgba(0,0,0,.2);
          color: @color-white;
          padding: 0 (4*@rem);
          opacity: 0;
          transition: opacity @animation-speed-slow @animation-type;
          font-size: (12*@rem);
        }
      }
    }

    &:hover {
      code[data-lang]:before {opacity: 1;}
    }

    &[data-name] {
      padding-top: (25*@rem);
      &::before {
        content: attr(data-name);
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        line-height: (20*@rem);
        background-color: rgba(0,0,0,.05);
        font-size: (12*@rem);
        padding: 0 (6*@rem);
        color: @color-gray;
        font-weight: bold;
        border-bottom: @border-color @border-width dotted;
      }

      code[data-lang]:before {
        opacity: 1;
        line-height: (20*@rem);
      }
    }
  }

  > pre:first-child {margin-top: 0}
  > pre:last-child {margin-bottom: 0}

  h1, h2, h3 {
    margin: 4px 0 16px 0;
  }

  h4, h5, h6 {
    margin: 4px 0 8px;
  }

  h1 {
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,.1);
  }

  blockquote {
    margin: 8px 0;
    padding: 0 8px 0 16px;
    color: #777;
    border-left: 4px solid rgba(0,0,0,.1);
  }

  table {
    margin: 4px 0 8px;
    max-width: 100%;
    border: 1px solid rgba(0,0,0,.1);

    > thead > tr > td,
    > thead > tr > th,
    > tbody > tr > td,
    > tbody > tr > th,
    > tfoot > tr > td,
    > tfoot > tr > th {
      border: 1px solid rgba(0,0,0,.1);
      padding: 4px 8px;
    }

    > thead,
    > tfoot {
      > tr > td,
      > tr > th {
        background-color: @color-gray-lighter;
      }
    }
  }

  hr {
    margin: 4px 0 8px;
    border: none;
    border-top: 1px solid rgba(0,0,0,.1);
  }

  p > code {
    padding: 0 .5em;
    display: inline-block;
    background: rgba(0,0,0,.05);
  }
}
